<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>快開彩期中心 (List) </title>
<link rel="stylesheet" href="../../css/mem_main.css" type="text/css">
<script language="JavaScript" src="/inc/admin_envirset.js"></script>
<script language="JavaScript1.2" type="text/javascript" src="/inc/ajax_begin.js?time=01"></script>
<script language="JavaScript">
<!--
strRowClassName = "clef";
var RSeconds = 0;
var AutoRefreshID;

function getWebGameData(){
	var strDocLoc = "index.php?op=ResultItem";

	createXMLHttpRequest();
	xmlHttp.onreadystatechange = handleWebGameDataChange;
	xmlHttp.open("GET", strDocLoc, true);
	xmlHttp.send(null);
	stopAutoRefresh();
}

function handleWebGameDataChange(){
	if(xmlHttp.readyState == 4){
		if(xmlHttp.status == 200){
			var xmlDoc = xmlHttp.responseText;
			
			if(xmlDoc.indexOf("Error") != -1){
				alert(xmlDoc);
				return;
			}

			showWebGameData(eval(xmlDoc));
			ChangeRefreshSec();
			return;
		}
	}
}

function showWebGameData(arrCon){
	var intLID = 0, strID = "", strTmp = "";
	for(intLID = 5; intLID <= 8; intLID++){
		setWebGameDataToTable(intLID, arrCon[intLID - 5]);
	}
}

function setWebGameDataToTable(intLID, arrCon){
	var objWTable = document.getElementById(("LID" + intLID.toString() + "Cont"));
	var objCon = null, intWebID = 0;

	with(objWTable)	{
		while(rows.length > 1)	deleteRow(rows.length - 1);

		for (var i = 0; i < arrCon.length; i++) {
			objCon = arrCon[i];

			newTR = insertRow();
			newTR.className = "clef";
			with(newTR){
				var intCellNo = 0;

				newTD = insertCell(intCellNo);
				newTD.innerHTML = objCon.SNo;
				intCellNo++;

				newTD = insertCell(intCellNo);
				newTD.innerHTML = objCon.OSNo;
				intCellNo++;

				newTD = insertCell(intCellNo);
				newTD.innerHTML = objCon.DTime;
				intCellNo++;

				for(intWebID = 0; intWebID <= 2; intWebID++){
					newTD = insertCell(intCellNo);
					newTD.innerHTML = objCon.NN[intWebID];
					if( intLID == 5 )newTD.innerHTML += " &nbsp;+&nbsp; " + objCon.NS[intWebID];
					intCellNo++;
				}

				newTD = insertCell(intCellNo);
				newTD.id = "Score" + intLID + "_" + i;
				newTD.innerHTML = '<a href="JavaScript:CountResult(' + intLID + ', \'' + objCon.GID + '\', ' + i + ')">結算</a>';
				intCellNo++;
			}
		}
	}
	//admin_en();
}

//重整方式
function RefreshType(){
	if(PageConfig.isEmergency == 1)alert(strOnEmergency);
	with(document.getDataForm){
		if(op.value == "StartGame"){
			StartGame();
		}else{
			GetOdds();
		}
	}
}

//定時重整
function RClock(i){
	if (RSeconds == 0){
		getWebGameData();
		RSeconds = i;
	}
	RSeconds --;
	if(document.getElementById("RSec"))document.getElementById("RSec").innerHTML = RSeconds;
}

//選擇定時時間
function ChangeRefreshSec(){
	stopAutoRefresh();
	AutoRefreshID = setInterval("RClock(60)",1000);
}

//停止自動更新
function stopAutoRefresh(){
	if(AutoRefreshID > 0)clearInterval(AutoRefreshID);
}

function CountResult(intLID, strWebGID, intNo){
	document.ScoreFrm.LottoID.value = intLID;
	document.ScoreFrm.WebGID.value = strWebGID;
	open_win(intLID, intNo);
}

function open_win(intLID, intNo){
	var strID = "Score" + intLID + "_" + intNo;
	var strDivID = "LID" + intLID + "Div";
	var objData = document.getElementById(strID);
	document.getElementById("score_window").style.top = document.getElementById(strDivID).offsetTop + objData.offsetTop + objData.clientHeight;
	document.getElementById("score_window").style.left = objData.offsetLeft - 50;
	document.getElementById("score_window").style.display = "";
	clearScore();
}

function close_win(){
	document.getElementById("score_window").style.display = "none";
}

function clearScore(){
	with(document.ScoreFrm){
		NumberNormal0.value = "";
		NumberNormal1.value = "";
		NumberNormal2.value = "";
		NumberNormal3.value = "";
		NumberSpecial.value = "";
	}
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="getWebGameData();ChangeRefreshSec()">
<table width="770" border="0" cellspacing="0" cellpadding="0" class="cmti">
  <tr> 
    <td>快開彩期中心: <b id="RSec" style="color: #FF0000">15</b> sec&nbsp;&nbsp;&nbsp;<input type="button" value="重整" onclick="location.reload()">
	&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.php?op=List">期數管理</a>
	</td>
  </tr>
</table>

<div>重慶時時彩</div>
<div class="ctabdv" id="LID7Div">
  <table width="1000" border="0" cellspacing="1" cellpadding="0" class="ctab" id="LID7Cont">
    <tr class="ctiga"> 
      <td width="80">一般期數</td>
      <td width="80">官方期數</td>
	  <td width="120">日期時間</td>
	  <td width="200">合眾</td>
      <td width="200">大眾</td>
	  <td width="200">萬眾</td>
      <td>輸入賽果</td>
    </tr>
<!-- 
    <tr class="clef">
      <td>{ShowSerailNo}</td>
      <td>{ShowOSerailNo}</td>
	  <td>{ShowDateTime}</td>
	  <td>{ShowResult0}</td>
      <td>{ShowResult1}</td>
	  <td>{ShowResult2}</td>
      <td><a href="JavaScript:OpenClose(0)">結算</a></td>
    </tr>
 //-->
  </table>
</div>
<br />
<hr /><br />

<div>黑龍江時時彩</div>
<div class="ctabdv" id="LID8Div">
  <table width="1000" border="0" cellspacing="1" cellpadding="0" class="ctab" id="LID8Cont">
    <tr class="ctiga"> 
      <td width="80">一般期數</td>
      <td width="80">官方期數</td>
	  <td width="120">日期時間</td>
	  <td width="200">合眾</td>
      <td width="200">大眾</td>
	  <td width="200">萬眾</td>
      <td>輸入賽果</td>
    </tr>
  </table>
</div>
<br />
<hr /><br />

<div>上海時時彩</div>
<div class="ctabdv" id="LID6Div">
  <table width="1000" border="0" cellspacing="1" cellpadding="0" class="ctab" id="LID6Cont">
    <tr class="ctiga"> 
      <td width="80">一般期數</td>
      <td width="80">官方期數</td>
	  <td width="120">日期時間</td>
	  <td width="200">合眾</td>
      <td width="200">大眾</td>
	  <td width="200">萬眾</td>
      <td>輸入賽果</td>
    </tr>
  </table>
</div>
<br />
<hr /><br />

<div>廣西時時彩</div>
<div class="ctabdv" id="LID5Div">
  <table width="1000" border="0" cellspacing="1" cellpadding="0" class="ctab" id="LID5Cont">
    <tr class="ctiga"> 
      <td width="80">一般期數</td>
      <td width="80">官方期數</td>
	  <td width="120">日期時間</td>
	  <td width="200">合眾</td>
      <td width="200">大眾</td>
	  <td width="200">萬眾</td>
      <td>輸入賽果</td>
    </tr>
  </table>
</div>

<br /><br />
<iframe src="" width="400" height="300" name="getData"></iframe>

<form name="ScoreFrm" method="GET" action="index.php" target="getData">
<div id="score_window" style="display: none; position:absolute; background-color: #FFFF00">
<input type="hidden" name="op" value="CountResult">
<input type="hidden" name="LottoID" value="">
<input type="hidden" name="WebGID" value="">
<table width="280" border="0" cellspacing="1" cellpadding="2" bgcolor="00558E">
  <tr>
    <td bgcolor="#FFFFFF">
		<table width="280" border="0" cellspacing="0" cellpadding="0" class="m_tab_fix" >
			<tr bgcolor="0163A2"> 
				<td width="260" style="font-size:12px; color:#FFFFFF">&nbsp;&nbsp;<font color="#FFFFFF" id="AuthTipName">&nbsp;Tip</font>&nbsp;&nbsp;&nbsp;結果</td>
				<td align="right" valign="top" ><a style="cursor:hand;" onClick="close_win();"><img src="/images/k_admin/edit_dot.gif" width="16" height="14"></a></td>
			</tr>
			<tr bgcolor="#000000"><td colspan="2" height="1"></td></tr>
			<tr bgcolor="#D8E4F8">
				<td colspan="2">
	  &nbsp;號碼 <input type="text" name="NumberNormal0" class="zatexted" size="3" value="">-
	  <input type="text" name="NumberNormal1" class="zatexted" size="3" value="">-
	  <input type="text" name="NumberNormal2" class="zatexted" size="3" value="">-
	  <input type="text" name="NumberNormal3" class="zatexted" size="3" value=""> <br />
	  &nbsp;特碼 <input type="text" name="NumberSpecial" class="zatexted" size="3" value="">
				</td></tr>
			<tr bgcolor="#D8E4F8">
				<td colspan="2" align="center"><input type="submit" name="zabutton">
				</td></tr>
      </table>
    </td>
  </tr>
</table>
</div>
</form>
</body>
</html>
